#include "module_window_property.h"
#include "ui_module_window_property.h"

#include <QDebug>

module_window_property::module_window_property(QWidget *parent) :
    QFrame(parent),
    ui(new Ui::module_window_property)
{
    ui->setupUi(this);

    //setCursor(Qt::PointingHandCursor);
}

module_window_property::~module_window_property()
{
    delete ui;
}

void module_window_property::set_module_types(ModuleTypes *mts)
{
    this->second_module_types = mts;
}

void module_window_property::set_name(QString name)
{
    ui->lineEdit_Name->setText(name);
}

void module_window_property::set_type(QString type)
{
    ui->label_type->setText(type);
}

void module_window_property::set_class(QString cls)
{
    ui->label_class->setText(cls);
}

void module_window_property::on_lineEdit_Name_editingFinished()
{
    qDebug() << "Finish";
}


void module_window_property::on_lineEdit_Name_textChanged(const QString &arg1)
{
    //qDebug() << arg1;
    emit this->getLableName(arg1);  //发送Lable标签更改的信号给module_window
    this->second_module_types->SetName(arg1);
    this->second_module_types->Name = arg1;
}

